package com.example.verification.web;

import com.example.verification.service.RoleService;
import com.example.verification.utils.RetBack;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author rcl
 * @date 2019/8/15 10:24
 */
@Controller
@RequestMapping("/role")
public class RoleController {

    @Autowired
    RoleService roleService;

    @GetMapping("/roles")
    @ResponseBody
    public RetBack getRoleList() {
        return RetBack.success(roleService.getRoleList());
    }
}
